import 'package:get/get.dart';
import 'package:getx_simple_code/common/apis/DishesAPI.dart';
import 'package:getx_simple_code/pages/diovc/logic.dart';
import 'package:getx_simple_code/pages/diovc/pojo/dishesEntity.dart';

import 'state.dart';

class DiovcdetailLogic extends GetxController {
  final DiovcdetailState state = DiovcdetailState();
  @override
  void onReady() {
    // TODO: implement onReady
    super.onReady();
  }

  @override
  void onClose() {
    // TODO: implement onClose
    print('详情页面关闭');
    super.onClose();
  }
  deleteDishes(String id) async{
    Records params = Records(
      id: id
    );
    await DishesAPIPage.dishesDelete(param:params);
    Get.back(result: {"success": true});
  }

}
